<template>
  <div class="vipIntro-box">
    <nav-com
      title="会员介绍"
      :showView="showView"
      @back="backHandler()"
    ></nav-com>
    <div class="vipIntro-content">
      <div class="top">
        <div class="ad-banner">
          <img src="@/assets/vip/ad-banner.png" />
        </div>
        <div class="open-btn">
          <van-button block type="danger" @click="openVip">
            立即开通即享会员身份
          </van-button>
        </div>
      </div>
      <div class="center" v-html="vipdesc">
      </div>
    </div>
  </div>
</template>

<script>
import navCom from "@/component/nav";
import Loading from "@/component/loading";
// import { Popup, Toast } from "vant";
// import { Icon } from "vant";
import Upgrade from "@/component/upgrade.vue";
import { vipdesc } from "@/api/api";
export default {
  name: "index",
  components: {
    navCom,
    Loading,
    Upgrade,
  },
  data() {
    return {
      showView: true,
      LOADING: true,
      isvip: 0,
      vipdesc: "",
    };
  },
  mounted() {
    this.queryvip_desc();
  },
  methods: {
    //返回
    backHandler() {
      if (weixin.isAndroid()) {
        window.JS_TROOPS.goBack();
      } else {
        this.$router.go(-1);
      }
    },
    queryvip_desc() {
      vipdesc().then((res) => {
        console.log("res", res);
        if (res.data.code == 1) {
          this.vipdesc = res.data.data;
        }
      });
    },
    openVip() {
      this.$router.push("/vipCharge");
    },
  },
};
</script>
<style scoped>
.top {
  padding: 12px;
}
.ad-banner {
  margin-bottom: 8px;
}
.ad-banner img {
  width: 100%;
}
/deep/ .van-button--danger {
  background: linear-gradient(90deg, #ff4050 0%, #fa2c1e 100%);
}
.center {
  padding: 0 10px;
}
/deep/.center img {
  width: 100%;
}
</style>